#ifndef EVENT_H
#define EVENT_H

#include <queue>
#include <stack>

enum EventType {
    GET_VERTEX,
    UNDO_GET_VERTEX,
    NOT_GET_VERTEX,
    UNDO_NOT_GET_VERTEX,
    UNKNOWN_OPERATION
};

struct Event
{
    Event() {}
    Event(EventType type, size_t vertex)
        :type(type), vertex(vertex) {}
    EventType type;
    size_t vertex;

    static EventType undoType(EventType type) {
        switch (type) {
            case GET_VERTEX:
                return UNDO_GET_VERTEX;
            case UNDO_GET_VERTEX:
                return GET_VERTEX;
            case NOT_GET_VERTEX:
                return UNDO_NOT_GET_VERTEX;
            case UNDO_NOT_GET_VERTEX:
                return NOT_GET_VERTEX;
            default:
                return UNKNOWN_OPERATION;
        }
    }
};

typedef std::queue<Event> EventQueue;
typedef std::stack<Event> EventStack;
#endif//EVENT_H
